<!doctype html>
<html>
<head>
  <title>WebRTC: Simple RTCDataChannel sample</title>
  <meta charset="utf-8">
  <link rel="stylesheet" href="main.css" type="text/css" media="all">
  <script src="../adapter.js"></script>
  <script src="main.js"></script>
</head>
<body>
  <h1>MDN - WebRTC: Simple RTCDataChannel sample</h1>
  <p>This sample is an admittedly contrived example of how to use an <code>RTCDataChannel</code> to
  exchange data between two objects on the same page. See the
  <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Simple_RTCDataChannel_sample">
  corresponding article</a> for details on how it works.</p>
  
  <div class="controlbox">
    <button id="connectButton" name="connectButton" class="buttonleft">
      Connect
    </button>
    <button id="disconnectButton" name="disconnectButton" class="buttonright" disabled>
      Disconnect
    </button>
  </div>
  
  <div class="messagebox">
    <label for="message">Enter a message:
      <input type="text" name="message" id="message" placeholder="Message text" 
              inputmode="latin" size=60 maxlength=120 disabled>
    </label>
    <button id="sendButton" name="sendButton" class="buttonright" disabled>
      Send
    </button>
  </div>
  <div class="messagebox" id="receivebox">
    <p>Messages received:</p>
  </div>
</body>
MDN-WebRTC：简单的RTCDataChannel示例
该示例是一个公认的示例，说明如何使用和RTCDataChannel来在同一页面上的两个对象之间交换数据。有关其工作方式的详细信息，请参见 相应的文章。
</html
